#pragma once
#include <iostream>
#include <memory>
#include "Connection.hpp"
#include "Reactor.hpp"
#include "Protocol.hpp"
#include "Calculator.hpp"

class Factory
{
public:
    Connection* BuildListenConn(int fd, uint32_t events, Reactor* R, func_t reader)
    {
        Connection* conn = new Connection(fd, events, R);
        conn->Register(reader, nullptr, nullptr);
        return conn;
    }

    Connection* BuildConn(int fd, uint32_t events, Reactor* R, func_t reader, func_t writer, func_t exepter)
    {
        Connection* conn = new Connection(fd, events, R);
        conn->Register(reader, writer, exepter);
        return conn;
    }



};